package com.github.gaojh.example.aop;

import com.github.gaojh.aop.aspects.AopAdapter;

import java.lang.reflect.Method;

/**
 * @author gaojh
 * @since 2020/3/26
 */
public class Demodapter implements AopAdapter {

    @Override
    public boolean before(Object target, Method method, Object[] args) {
        System.out.println("aop before");
        return true;
    }

    @Override
    public boolean after(Object target, Method method, Object[] args, Object returnVal) {
        System.out.println("aop after");
        return true;
    }

    @Override
    public boolean afterException(Object target, Method method, Object[] args, Throwable e) {
        return false;
    }
}
